package com.station.server.entity;

import com.station.client.proxies.PCoordinates;
import com.station.client.proxies.PSize;

import javax.persistence.*;

/**
 * User: JinJavaMojo
 * Date: 25.09.13
 */

@MappedSuperclass
abstract public class PlaceableEntity extends BaseEntity {
    public PlaceableEntity() {
    }

    public PlaceableEntity(Coordinates coordinates, Size size) {
        this.coordinates = coordinates;
        this.size = size;
    }

    public PlaceableEntity(PCoordinates coordinates, PSize size) {
        this.coordinates = Coordinates.transform(coordinates);
        this.size = Size.transform(size);
    }

    @Embedded
    public Coordinates coordinates;

    @Embedded
    public Size size;

}
